Use G_DEFINE_INTERFACE macro in gtkbuildable
authorJavier Jardón <jjardon@gnome.org>
Fri, 9 Apr 2010 00:50:52 +0000 (02:50 +0200)
committerJavier Jardón <jjardon@gnome.org>
Tue, 13 Apr 2010 05:44:12 +0000 (07:44 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=605186

gtk/gtkbuildable.c

index d3a8d8e4420fed018376818a811b1b00e0b0a87e..299e5b47a848a799b372f50d3dc82b42ce3c1b2a 100644 (file)
 #include "gtkintl.h"
 #include "gtkalias.h"
 
-GType
-gtk_buildable_get_type (void)
-{
-  static GType buildable_type = 0;
 
-  if (!buildable_type)
-    buildable_type =
-      g_type_register_static_simple (G_TYPE_INTERFACE, I_("GtkBuildable"),
-                                    sizeof (GtkBuildableIface),
-                                    NULL, 0, NULL, 0);
+typedef GtkBuildableIface GtkBuildableInterface;
+G_DEFINE_INTERFACE (GtkBuildable, gtk_buildable, G_TYPE_OBJECT)
 
-  return buildable_type;
+static void
+gtk_buildable_default_init (GtkBuildableInterface *iface)
+{
 }
 
 /**